-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
B2B login - update template code to use CMS-controlled login page #22
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to tackle the multi-lang support at the same time here, is it possible we use the standard translation system? This would make it much easier for non-english customers to use the system they are used to
<div class="b2b-form"> | ||
|
||
|
||
{% if section.settings.login_type == 'passwordless' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't need a section setting - we can access this directly, I feel Cam used it in his template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly it never worked, all our Dawn Theme installs just show the button! As far as I can tell (and I may be wrong), you can't access this in liquid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cm-sl ah, try this {%- if shop.features.login_with_shop_classic_customer_accounts? -%}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work sadly, any other ideas?
Yeah, it's a fair point. It's going to be a trade off of being able to use the Customizer to make edits vs the Shopify translation (language string) feature. You lose the visual component which is the main attraction of using the Customizer! May be a silly question, when Shopify themes are so reliant on the Customizer, how are they handling multi-lang? Right now, this new setup will allow Market-base translations (which in theory have langauges set, see video) |
Totally get its easier for some of the strings which are custom to the store but there's standard strings we can use for the "email" and "password" fields. If we're working for built with Shopify multi-language is key |
@rlweb There aren't standard strings though in Shopify... it varies by theme and whatever the theme developer decides! Here are two examples, both are 'Login' but use different variables ![]() ![]() Also highlighted by this change where we added a lang string for Dawn, but didn't work for anything else! ![]() Basically... I don't think there's a way to do this. It seems a lot of stores just use the translate and adapt app to do this magically. |
We're crossing paths here, but my suggestion is that this repo (for when clients use our installed dawn) uses the translations baked in for every language, meaning out of the box it works for the 20 languages supported by Dawn. For other themes, we can link to these files as a gist in the manor they work here which yes means its easier as we can't guarantee the strings match. Thoughts? |
@rlweb Fixed! So for the login form, this is using standard Shopify-theme (e.g. Dawn) language strings The rest of the page is CMS controlled |
This includes the modified B2B login page here
This removes the old version that was hard-coded languages, bad CSS, etc
HELP DOCS need updating once merged as it changes the URL from trade-login to b2b-login ('trade-login' was a legacy from Robert Welch, it's not actually a familiar term with most users)